package jp.co.worksap.ate.gomoku.localai;

import jp.co.worksap.ate.gomoku.model.GoState;
import jp.co.worksap.ate.gomoku.model.Goban;

public class GobanTree {
	private GobanNode root;
	private GoState goType;
	private double score = 0.0;
	private double enemyScore = 0.0;
	private int nodeNum = 0;
	public GobanTree(Goban goban, GoState goType, int x, int y) {
		root = new GobanNode(goban, goType, x, y);
		root.setLevelProb(1);
		root.setTotalProb(1);
		this.goType = goType;
	}
	public GobanNode getRoot() {
		return root;
	}
	public void addSocre(double score) {
		this.score += score;
	}
	public double getSocre() {
		return score;
	}
	public boolean isSameGoType(GoState goType) {
		return this.goType == goType;
	}
	public void addEnemyScore(double enemyScore) {
		this.enemyScore += enemyScore;
	}
	public double getEnemyScore() {
		return enemyScore;
	}
	public int getNodeNum() {
		return nodeNum;
	}
	public void setNodeNum(int nodeNum) {
		this.nodeNum = nodeNum;
	}
}
